<?php
include_once("../wx_pay/WxPayHelper.php");

$commonUtil = new CommonUtil();
// print_r($commonUtil);exit;
$wxPayHelper = new WxPayHelper();


$wxPayHelper->setParameter("bank_type", "WX");
$wxPayHelper->setParameter("body", "test");
// $wxPayHelper->setParameter("partner", "1900000109");
$wxPayHelper->setParameter("partner", "1219946301");
$wxPayHelper->setParameter("out_trade_no", $commonUtil->create_noncestr());
$wxPayHelper->setParameter("total_fee", "1");
$wxPayHelper->setParameter("fee_type", "1");
// $wxPayHelper->setParameter("notify_url", "htttp://www.baidu.com");
$wxPayHelper->setParameter("notify_url", "e24c.com/php/");
$wxPayHelper->setParameter("spbill_create_ip", "127.0.0.1");
// $wxPayHelper->setParameter("spbill_create_ip", "192.168.0.137");
$wxPayHelper->setParameter("input_charset", "GBK");


?>
<html>
<script language="javascript">
function callpay()
{
	WeixinJSBridge.invoke('getBrandWCPayRequest',<?php echo $wxPayHelper->create_biz_package(); ?>,function(res){
	WeixinJSBridge.log(res.err_msg);
	alert(res.err_code+res.err_desc+res.err_msg);
	});
}
</script>
<body>
<button type="button" onclick="callpay()">wx pay test</button>
</body>
</html>
